package com.humble.humbleojjudgeservice.judge.controller;

import com.humble.humbleojjudgeservice.judge.JudgeService;
import com.humble.humbleojserviceclient.service.JudgeFeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {
    @Resource
    private JudgeService judgeService;

    @PostMapping("/do")
    public void doJudgeService(@RequestParam("questionSubmitId") Long questionSubmitId) throws Exception {
        judgeService.doJudgeService(questionSubmitId);
    }

    @PostMapping("/test")
    public void doTest(){
        System.out.println("hello");
    }

}
